<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
            "http://www.w3.org/TR/html4/strict.dtd">

<jsp:directive.page errorPage="/WEB-INF/dmv/ErrorPage.jsp"/>
<jsp:directive.page import="java.util.*"/>
<jsp:directive.page import="org.twndmv.dto.*"/>
<html>
    <title>Create Driver Form</title>
    <body>
        <h2>Create Driver</h2>
        
        <jsp:scriptlet>
            String handler = request.getContextPath() + "/dmv";
        </jsp:scriptlet>
        
        <form method="POST"
            action="<%= handler %>">
            First Name: <input type="text" name="firstName" size="25" value=""/><p/>
            Middle Name: <input type="text" name="middleName" size="25" value=""/><p/>
            Last Name: <input type="text" name="lastName" size="25" value=""/><p/>
            Height: <input type="text" name="height" size="25" value=""/><p/>
            Weight: <input type="text" name="weight" size="25" value=""/><p/>
            Hair Color: <select name="hairColor">
                    <jsp:scriptlet>
                      List colors = (List)request.getAttribute("colors");
                      for(Object color : colors) {
                    	  String t = color.toString();
                    </jsp:scriptlet>
                    <option value="<%= t %>" ><%= t %></option>
                    <jsp:scriptlet>
                      }
                    </jsp:scriptlet>
                  </select><p/> 
            Eye Color: <select name="eyeColor">
                    <jsp:scriptlet>
                      for(Object color : colors) {
                    	  String t = color.toString();
                    </jsp:scriptlet>
                    <option value="<%= t %>" ><%= t %></option>
                    <jsp:scriptlet>
                      }
                    </jsp:scriptlet>
                  </select><p/> 
            Gender: <select name="gender"><option value="MALE">MALE</option><option value="FEMALE">FEMALE</option><option value="UNKNOWN">UNKNOWN</option></select><p/>
            Date of Birth (mm/dd/yyyy): <input type="text" name="dateOfBirth" size="25" value=""/><p/> 
            Street No: <input type="text" name="streetNo" size="25" value=""/><p/>
            Street Name: <input type="text" name="streetName" size="25" value=""/><p/>
            City: <input type="text" name="city" size="25" value=""/><p/>
            State: <select name="state">
                    <jsp:scriptlet>
                      List states = (List)request.getAttribute("states");
                      for(Object state : states) {
                    	  String t = state.toString();
                    </jsp:scriptlet>
                    <option value="<%= t %>" ><%= t %></option>
                    <jsp:scriptlet>
                      }
                    </jsp:scriptlet>
                  </select><p/>
            Zip Code: <input type="text" name="zipCode" size="5" value=""/><p/>
            Move In Date (mm/dd/yyyy): <input type="text" name="moveInDate" size="25" value=""/><p/>
            Move Out Date (mm/dd/yyyy): <input type="text" name="moveOutDate" size="25" value=""/><p/>
            <input type="submit" name="command" value="Create Driver"/>
        </form>
        </body>
        </html>
        